/*
 * Wazuh databaseFeedManager
 * Copyright (C) 2015, Wazuh Inc.
 * February 27, 2024.
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License (version 2) as published by the FSF - Free Software
 * Foundation.
 */
#ifndef _TRAMPOLINE_SOCKETDBWRAPPER_HPP
#define _TRAMPOLINE_SOCKETDBWRAPPER_HPP

#include "MockSocketDBWrapper.hpp"
#include "singleton.hpp"

extern std::shared_ptr<MockSocketDBWrapper> spSocketDBWrapperMock;

/**
 * @brief This class is a wrapper of the trampoline socket DB wrapper
 */
class TrampolineSocketDBWrapper final : public Singleton<TrampolineSocketDBWrapper>
{
public:
    /**
     * @brief Constructor.
     *
     */
    TrampolineSocketDBWrapper() = default;

    /**
     * @brief Destructor.
     *
     */
    virtual ~TrampolineSocketDBWrapper() = default;

    /**
     * @brief Mock method for creating an orchestrator and returns it.
     *
     * @param query DB query string.
     * @param response JSON object
     */
    void query(const std::string& query, nlohmann::json& response)
    {
        spSocketDBWrapperMock->query(query, response);
    }

    /**
     * @brief Mock method for initializing the orchestrator.
     *
     */
    void init()
    {
        spSocketDBWrapperMock->init();
    }
};

#endif //_TRAMPOLINE_SOCKETDBWRAPPER_HPP
